﻿Ext.define('app.prm.project.Index', {
    extend: 'Ext.grid.Panel',
    title: '项目清单',
    border: false,
    tbar:[],
    viewConfig: {
        enableTextSelection: true //可以复制单元格文字
    },
    controller: 'project',
    requires: ['app.prm.project.ProjectController'],
    initComponent: function () {
        var me = this;
        me.tbar = [
            {
                text: '新增', iconCls: "add", handler: 'onAdd'
            }
        ];
        me.store = Ext.create("app.ux.PagePrmStore", { url: '/api/services/app/project/GetAll' });
        me.callParent();
    },
    forceFit: false,
    columns: [
        {
            xtype: 'actioncolumn',
            width: 70,
            header: '操作',
            items: [
            {
                iconCls: 'edit',
                tooltip: '编辑',
                handler: 'onEditProject'
            }]
        },
        { header: "项目编号", dataIndex: 'projectNo' },
        { header: "项目名称", dataIndex: 'projectName' },
        { header: "产品号", dataIndex: 'productNo' },
        { header: "客户", dataIndex: 'customer' },
        { header: "客户编号", dataIndex: 'customeCode' },
        { header: "研发中心", dataIndex: 'rdCenter' },
        { header: "研究室", dataIndex: 'lab' },
        { header: "计划开始时间", dataIndex: 'planStartDate' },
        { header: "计划结束时间", dataIndex: 'planEndDate' },
        { header: "客户要求完成时间", dataIndex: 'targetEndDate' },
    ]
})